/*
 * Copyright 2011 Angel Sanadinov
 *
 * This file is part of VBox WMI.
 *
 * VBox WMI is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * VBox WMI is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with VBox WMI.  If not, see <http://www.gnu.org/licenses/>.
 */

package Beans.Responses;

import Utilities.ApplicationException;
import java.util.ArrayList;

/**
 * Instances of this class are used when returning a response to a login request.
 *
 * @author Angel Sanadinov
 */
public class LoginResponse extends ResponseBean
{
    /**
     * No-argument constructor.
     *
     * @see ResponseBean#ResponseBean()
     */
    public LoginResponse(){}

    /**
     * Constructs the response object using the supplied data.
     *
     * @param requestResult the result of the request. Set to <code>true</code> for
     *                      success or to <code>false</code> for failure
     * @param exception an exception that occurred during request processing
     */
    public LoginResponse(boolean requestResult, ApplicationException exception)
    {
        super(requestResult, exception);
    }

    @Override
    public ArrayList<ApplicationException> getExceptions()
    {
        return null;
    }

    /**
     * Returns a textual representation of the object. <br>
     *
     * It is in the form: "ClassName: (super.toString)".
     *
     * @return the object represented as a String
     */
    @Override
    public String toString()
    {
        return LoginResponse.class.getSimpleName() + ": (" + super.toString() + ")";
    }
}
